"""
URL configuration for apps project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from apps.views.dev_data_views import DevDataView,DevDataAnalysisView,GetDevDataView
from apps.views.data_views import (
    DataListView,
    DataDetailView,
    DeviceDataView,
    DeviceDataDetailView,
    DeviceRegionInfoView
)
from apps.views.plt_views import PltPlotDevView
from apps.views.model_views import TrainCatBoostView
from apps.views.x_views import XView1,XView2,XView3
from apps.views.tsfresh_views import YaliTimeView,YaliTimePeriodicityView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('dev-data/', DevDataView.as_view(), name='dev_data_list'),
    path('dev-data/<int:pk>/', DevDataView.as_view(), name='dev_data_detail'),
    path('get-dev-data/', GetDevDataView.as_view(), name='get_dev_data'),
    path('analysis', DevDataAnalysisView.as_view(), name='dev_data_analysis'),
    path('plt/dev-plot/', PltPlotDevView.as_view(), name='one_dev_plot'),
    path('data/', DataListView.as_view(), name='data-list'),
    path('data/<int:data_id>/', DataDetailView.as_view(), name='data-detail'),
    path('data/device/<int:device_id>/', DeviceDataView.as_view(), name='device-data'),
    path('data/device/<int:device_id>/details/', DeviceDataDetailView.as_view(), name='device-data-details'),
    path('data/device/region-info/', DeviceRegionInfoView.as_view(), name='device-region-info'),
    path('model/train/', TrainCatBoostView.as_view(), name='tran-catboost'),
    path('x/one/', XView1.as_view(), name='x-learn-one'),
    path('x/two/', XView2.as_view(), name='x-learn-two'),
    path('x/three/', XView3.as_view(), name='x-learn-three'),
    path('yali/time/', YaliTimeView.as_view(), name='yali-time'),
    path('yali/periodicity/', YaliTimePeriodicityView.as_view(), name='yali-periodicity'),
]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)